package com.example.palette.bean;


public class FileDetected implements Comparable<FileDetected>{
    public static final int FILE_TYPE_DIRECTORY = 0;
    public static final int FILE_TYPE_IMAGE = 1;
    public static final int FILE_TYPE_UNKNOWN = 2;
    private String name;
    private int fileType;
    private boolean isSelected;

    public FileDetected() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getFileType() {
        return fileType;
    }

    public void setFileType(int fileType) {
        this.fileType = fileType;
    }

    public boolean isSelected() {
        return isSelected;
    }

    public void setSelected(boolean selected) {
        isSelected = selected;
    }

    @Override
    public int compareTo(FileDetected after) {
        if(this.fileType == after.fileType){
            return this.name.compareTo(after.name);
        }else {
            return this.fileType - after.fileType;
        }
    }
}
